package com.chat.mapper;

import com.chat.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    User selectUserById(int id);

    User selectUserByAccount(String account);

    void insertUser(User user);

    void updateUser(User user);

    List<User> selectUsersByRoom(int roomId);

    List<User> selectUsers();

    User selectAdmin(@Param(value = "roomId") int roomId,@Param(value = "adminId")int adminId);

    User login(@Param(value = "account") String account, @Param(value = "password") String password);
}
